package com.hualan.mapper.wsj;

import com.hualan.pojo.wsj.FM;
import com.hualan.pojo.wsj.FmType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FmMapper {
    @Select(value = "select * from fm where del = 0")
    List<FM> listAll();

    //所有分类
    @Select("select * from fmtype where del = 0")
    List<FmType> listType();

    //根据类型查询分类下的内容
    @Select("select * from fm where typeId = #{typeId} and del = 0")
    List<FM> listByType(Integer typeId);
}
